🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / core / ble / src / commonMain / kotlin / org / meshtastic / core / ble / BleConnectionState.kt
Displaying Raw • Download
core/ble/src/commonMain/kotlin/org/meshtastic/core/ble/BleConnectionState.kt 0a44b948ec0573dc62ec68c19e46e62d40fcd1a3 (0a44b948) Text, 2.60 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.ble
T8b949e/** Represents the state of a BLE connection. */
Tff7b72sealed Tff7b72interface T56d364BleConnectionState Tb4b4b4{
T8b949e/**
* The peripheral is disconnected.
*
* @param reason why the disconnect occurred. [DisconnectReason.Unknown] when the platform doesn't provide status
* information (e.g. JavaScript) or when the disconnect was synthesised locally without a GATT callback.
*/
Tff7b72data Tff7b72class T56d364DisconnectedTb4b4b4(Tff7b72val Te6edf3reasonTb4b4b4: Te6edf3DisconnectReason Tff7b72= Te6edf3DisconnectReasonTb4b4b4.Te6edf3UnknownTb4b4b4) Tb4b4b4: Te6edf3BleConnectionState
T8b949e/** The peripheral is connecting. */
Tff7b72data Tff7b72object T56d364Connecting Tb4b4b4: Te6edf3BleConnectionState
T8b949e/** The peripheral is connected. */
Tff7b72data Tff7b72object T56d364Connected Tb4b4b4: Te6edf3BleConnectionState
T8b949e/** The peripheral is disconnecting. */
Tff7b72data Tff7b72object T56d364Disconnecting Tb4b4b4: Te6edf3BleConnectionState
Tb4b4b4}
T8b949e/**
* Platform-agnostic reason for a BLE disconnect.
*
* Mapped from Kable's [com.juul.kable.State.Disconnected.Status] in `KableStateMapping`.
*/
Tff7b72sealed Tff7b72interface T56d364DisconnectReason Tb4b4b4{
T8b949e/** Cause is unknown or the platform did not report one. */
Tff7b72data Tff7b72object T56d364Unknown Tb4b4b4: Te6edf3DisconnectReason
T8b949e/** The local app/central initiated the disconnect. */
Tff7b72data Tff7b72object T56d364LocalDisconnect Tb4b4b4: Te6edf3DisconnectReason
T8b949e/** The remote peripheral (firmware) initiated the disconnect. */
Tff7b72data Tff7b72object T56d364RemoteDisconnect Tb4b4b4: Te6edf3DisconnectReason
T8b949e/** A connection attempt failed to establish. */
Tff7b72data Tff7b72object T56d364ConnectionFailed Tb4b4b4: Te6edf3DisconnectReason
T8b949e/** The BLE link supervision timed out (device went out of range). */
Tff7b72data Tff7b72object T56d364Timeout Tb4b4b4: Te6edf3DisconnectReason
T8b949e/** The connection was explicitly cancelled. */
Tff7b72data Tff7b72object T56d364Cancelled Tb4b4b4: Te6edf3DisconnectReason
T8b949e/** An encryption or authentication failure occurred. */
Tff7b72data Tff7b72object T56d364EncryptionFailed Tb4b4b4: Te6edf3DisconnectReason
T8b949e/** Platform-specific status code that doesn't map to a known reason. */
Tff7b72data Tff7b72class T56d364PlatformSpecificTb4b4b4(Tff7b72val Te6edf3codeTb4b4b4: Tffa657IntTb4b4b4) Tb4b4b4: Te6edf3DisconnectReason
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.04s